/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */
#include "TransformComponent.h"
#include "MonoInternalCall.h"

namespace PQEngine
{
	void MonoInternalCall::OnCreateGameObject (MonoString* str) 
	{
		char* p = mono_string_to_utf8(str);
		std::string name=std::string(p);
		
	}

	void MonoInternalCall::setPosition(int id, float x,float y,float z)
	{
		TransformComponent* component=(TransformComponent*)Object::getObject(id);
		if(component!=0){
			component->setPosition(x,y,z);
			
		}
	}

	void MonoInternalCall::setOrientation(int id,float w, float x,float y,float z)
	{
		TransformComponent* component=(TransformComponent*)Object::getObject(id);
		if(component!=0){
			Ogre::Quaternion q(w,x,y,z);
			component->setOrientation(q);	
		}
	}

	void MonoInternalCall::setScale(int id,float x,float y,float z)
	{
		TransformComponent* component=(TransformComponent*)Object::getObject(id);
		if(component!=0){
			Ogre::Vector3 v(x,y,z);
			component->setScale(v);
		}
	}
}
